package com.example.administrator.demoa;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

public class MyService extends Service {

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        //在MyService主线程中进行耗时操作
        //会出现是否等待的弹框界面
        //需要new Thread新开一个线程
        /*int i = 0;
        while(i<=60){
            Log.e("MyService", "i = "+ i);
            i++;

            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }*/
    }
}
